﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestTeacher.aspx.cs" Inherits="School.Pages.Admission.TestTeacher" MasterPageFile="~/MasterALSafa.Master" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div align="center" dir="rtl">

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
        <asp:Panel ID="pnlAdd" runat="server" Visible="false">
            <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0" 
                dir="rtl">
                <tr>
                    <td colspan="2" class="admintitle">
                        ادخال المدرسين لاختبار القبول</td>
                </tr>
                <tr>
                    <td style="width: 160px">
                        <asp:Label ID="Label17" runat="server" CssClass="lab" Text="موعد الاختبار"></asp:Label>
                    </td>
                    <td align="right">
                        <asp:DropDownList ID="ddlTest_Id" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="ddlTest_Id_SelectedIndexChanged">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td style="width: 160px">
                        <asp:Label ID="Label1" runat="server" CssClass="lab" Text="المجمع"></asp:Label>
                    </td>
                    <td align="right">
                        <asp:DropDownList ID="ddlcampus_Id" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="ddlcampus_Id_SelectedIndexChanged" Enabled="False" 
                            Width="200px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td style="width: 160px">
                        <asp:Label ID="lblCertificate_Id" runat="server" CssClass="lab" 
                            Text="نوع الشهادة"></asp:Label>
                    </td>
                    <td align="right">
                        <asp:DropDownList ID="ddlCertificate_Id" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="ddlCertificate_Id_SelectedIndexChanged" 
                            Enabled="False" Width="200px">
                        </asp:DropDownList>

                    </td>
                </tr>
                <tr>
                    <td style="width: 160px">
                        <asp:Label ID="lblStage_Id" runat="server" CssClass="lab" Text="مرحلة القيد"></asp:Label>
                    </td>
                    <td align="right">
                        <asp:DropDownList ID="ddlStage_Id" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="ddlStage_Id_SelectedIndexChanged" Enabled="False" 
                            Width="200px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td style="width: 160px;">
                        <asp:Label ID="lblGrade_Id" runat="server" Text="الصف" CssClass="lab"></asp:Label>
                    </td>
                    <td align="right" >
                        <asp:DropDownList ID="ddlGrade_Id" runat="server" AutoPostBack="True" 
                            Height="27px" Enabled="False" Width="200px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td style="width: 160px;">
                        <asp:Label ID="Label3" runat="server" Text="السنة الدراسية" CssClass="lab"></asp:Label></td>
                    <td align="right" >
                        <asp:DropDownList ID="ddlEductionalYear_Id" runat="server" AutoPostBack="True" 
                            Enabled="False" Height="26px" Width="200px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td style="width: 160px">
                        <asp:Label ID="Label19" runat="server" CssClass="lab" Text="اسم المدرس"></asp:Label>
                    </td>
                    <td align="right">
                        <asp:DropDownList ID="ddlTeacher_Id" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="ddlTeacher_Id_SelectedIndexChanged" Width="200px" >
                        </asp:DropDownList>
                    </td>
                </tr>
                
                
                <tr>
                    <td colspan="2">
                        <asp:Label ID="lblMessageAdd" runat="server" CssClass="error"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Button ID="btnSave" runat="server" CssClass="graybutton" 
                            OnClick="btnSave_Click" Text="حفظ المدرسين" />

                        &nbsp;<asp:Button ID="btnCancel" runat="server" CssClass="graybutton" CausesValidation="False"
                            OnClick="btnCancel_Click" Text="تفريغ الحقول" />
                        &nbsp;<asp:Button ID="btnend" runat="server" CssClass="graybutton" CausesValidation="False"
                            OnClick="btnend_Click" Text="انهاء" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </div>
    <br />
    <div align="center" dir="rtl">
        <asp:Panel ID="pnlbrows" runat="server" Visible="true">
            <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0" 
                dir="rtl">
                <tr>
                    <td colspan="2" class="admintitle">
                        بحث بيانات المدرسين لاختبار القبول</td>
                </tr>
                <tr>
                    <td colspan="2">
                        <table width="90%" align="center" cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td>
                                    <asp:Label ID="Label18" runat="server" CssClass="lab" Text="موعد الاختبار"></asp:Label>
                                </td>
                                <td align="right">
                                    <asp:DropDownList ID="ddlSearchTest_Id" runat="server" AutoPostBack="True" 
                                        onselectedindexchanged="ddlSearchTest_Id_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label15" runat="server" CssClass="lab" 
                                        Text="المجمع"></asp:Label>
                                </td>
                                <td align="right">
                                    <asp:DropDownList ID="ddlSearchcampus_Id" runat="server" AutoPostBack="True" 
                                        onselectedindexchanged="ddlSearchcampus_Id_SelectedIndexChanged" 
                                        Enabled="False" Width="200px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lblCertificate_Id0" runat="server" CssClass="lab" 
                                        Text="نوع الشهادة"></asp:Label>
                                </td>
                                <td align="right">
                                    <asp:DropDownList ID="ddlSearchCertificate_Id" runat="server" 
                                        AutoPostBack="True" Enabled="False" Width="200px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lblStage_Id0" runat="server" CssClass="lab" Text="مرحلة القيد"></asp:Label>
                                </td>
                                <td align="right">
                                    <asp:DropDownList ID="ddlSearchStage_Id" runat="server" AutoPostBack="True" 
                                        Enabled="False" Width="200px">
                                    </asp:DropDownList>
                                   
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lblGrade_Id0" runat="server" CssClass="lab" Text="الصف"></asp:Label>
                                </td>
                                <td align="right">
                                    <asp:DropDownList ID="ddlSearchGrade_ID" runat="server" AutoPostBack="True" 
                                        Enabled="False" Width="200px">
                                    </asp:DropDownList>
                                 
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label2" runat="server" CssClass="lab" Text="السنة الدراسية"></asp:Label></td>
                                <td align="right">
                                    <asp:DropDownList ID="ddlSearchEductionalYear_Id" runat="server" 
                                        AutoPostBack="True" Width="200px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label20" runat="server" CssClass="lab" Text="اسم المدرس"></asp:Label>
                                </td>
                                <td align="right">
                                    <asp:DropDownList ID="ddlSearchTeacher_Id" runat="server" AutoPostBack="True" 
                                        Width="200px" >
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: center;" colspan="2">
                                    <asp:Button ID="btnSearch" runat="server" CssClass="graybutton" 
                                        OnClick="btnSearch_Click" Text="بحث" />
                                    &nbsp;<asp:Button ID="btnAdd" runat="server" CssClass="graybutton" 
                                        OnClick="btnAdd_Click" Text="اضافة جديد" />
                                    &nbsp;<asp:Button ID="btnGetAll" runat="server" CssClass="graybutton" 
                                        OnClick="btnGetAll_Click" Text="الكل" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" style="text-align: right">
                                    <asp:Label CssClass="lableface" ID="lblRecordNo" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:GridView Width="100%" AllowPaging="True" AllowSorting="True" ID="griddata" runat="server"
                                        CssClass="Grid" HeaderStyle-CssClass="GridHeaderFooter" FooterStyle-CssClass="GridHeaderFooter"
                                        PagerStyle-CssClass="GridPager" 
                                        AlternatingRowStyle-CssClass="GridItemAltername" 
                                        AutoGenerateColumns="False" 
                                        onselectedindexchanged="griddata_SelectedIndexChanged" 
                                        OnRowDeleting="griddata_RowDeleting" DataKeyNames="Id" 
                                        onrowdatabound="griddata_RowDataBound" 
                                        onpageindexchanging="griddata_PageIndexChanging">
                                        <AlternatingRowStyle CssClass="GridItemAltername" />
                                        <Columns>
                                            <asp:TemplateField HeaderText="المجمع">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblCampus" runat="server" Text='<%# Eval("ADM_Test.ORG_Campus.Name").ToString() %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="الشهادة">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblCertifcate" runat="server" Text='<%# Eval("ADM_Test.ORG_Certificate.Name").ToString() %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="المرحلة">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblStage" runat="server" Text='<%# Eval("ADM_Test.ORG_Stage.Name").ToString() %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="الصف">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrade" runat="server" Text='<%# Eval("ADM_Test.ORG_Grade.Name").ToString() %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="الاختبار من">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblFromDate" runat="server" Text='<%# Eval("ADM_Test.FromDate","{0:yyyy-MM-dd}")  %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="الاختبار إلي">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblToDate" runat="server" Text='<%# Eval("ADM_Test.ToDate","{0:yyyy-MM-dd}")  %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="المدرس">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblTeacher" runat="server" Text='<%# Eval("ORG_Stuff_Teacher.ORG_Stuff.FName").ToString() + " " +  Eval("ORG_Stuff_Teacher.ORG_Stuff.MName").ToString() + " " +  Eval("ORG_Stuff_Teacher.ORG_Stuff.LName").ToString()  %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:CommandField ShowSelectButton="True" SelectText="View" Visible="False" />
                                            <asp:TemplateField ShowHeader="False">
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete"
                                                                        Text="Delete"></asp:LinkButton>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>

                                            

                                        </Columns>
                                        <FooterStyle CssClass="GridHeaderFooter" />
                                        <HeaderStyle CssClass="GridHeaderFooter" />
                                        <PagerStyle CssClass="GridPager" />
                                    </asp:GridView>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:Label CssClass="error" ID="lblMessage" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    &nbsp;</td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </div>
    <br />
    
    <asp:Panel ID="pnldetails" runat="server" Visible="false">

                                    
            <table align="center" cellpadding="0" cellspacing="0" border="0" width="90%" dir="rtl">
             
                <tr>
                    <td>
                        <asp:DetailsView Width="100%" ID="DetViewdata" runat="server" AlternatingRowStyle-CssClass="GridItemAltername"
                            CssClass="Grid" HeaderStyle-CssClass="GridHeaderFooter" 
                            HeaderStyle-Width="30%" AutoGenerateRows="False">
                            <AlternatingRowStyle CssClass="GridItemAltername" />
                            <Fields>                                            
                            <asp:TemplateField HeaderText="المجمع">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblCampus" runat="server" Text='<%# Eval("ADM_Test.ORG_Campus.Name").ToString() %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="الشهادة">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblCertifcate" runat="server" Text='<%# Eval("ADM_Test.ORG_Certificate.Name").ToString() %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="المرحلة">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblStage" runat="server" Text='<%# Eval("ADM_Test.ORG_Stage.Name").ToString() %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="الصف">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblGrade" runat="server" Text='<%# Eval("ADM_Test.ORG_Grade.Name").ToString() %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="المدرس">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblTeacher" runat="server" Text='<%# Eval("ORG_Stuff_Teacher.ORG_Stuff.FName").ToString() + " " +  Eval("ORG_Stuff_Teacher.ORG_Stuff.MName").ToString() + " " +  Eval("ORG_Stuff_Teacher.ORG_Stuff.LName").ToString()  %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                            </Fields>
                            <HeaderStyle CssClass="GridHeaderFooter" Width="30%" />
                        </asp:DetailsView>
                    </td>
                </tr>
                
                
        <tr>
        <td>
            <input type="button" value="رجوع" onclick="history.go(-1)" class="graybutton" />
            </td>
        <td>&nbsp;</td>
        </tr>
                        
                        
        </table>            
        </asp:Panel>
        
         
</asp:Content>
